package com.skyolder.milkbee.repository;

import com.skyolder.milkbee.domain.Moderator;

import org.springframework.data.jpa.repository.*;

import java.util.List;

/**
 * Spring Data JPA repository for the Moderator entity.
 */
@SuppressWarnings("unused")
public interface ModeratorRepository extends JpaRepository<Moderator,Long> {

	Moderator findOneByLeaguerIdAndCategoryId(Long leaguerId, Long categoryId);

	List<Moderator> findByUserId(Long userId);
	
	@Query("from  Moderator m where m.categoryId=?1")
	List<Moderator> doQueryAllByCategoryId(Long cardId);

}
